import { observable, action } from 'mobx';

export default class BlogHomeStore {
  @observable activeKey = 0;
  @observable prePath = {};
  @observable hidden = true;

  @action setState = (params) => {
    Object.keys(params).map(key => {
      this[key] = params[key];
    })
  }

  @action setActiveKey = (key) => this.activeKey = key;

  @observable setPrePath = (key, path) => {
    this.prePath[key] = path;
  }

  @observable getPrePath = (key) => this.prePath[key];

}